/*
 * @Author: earl 
 * @Date: 2018-12-23 22:19:16 
 * @Last Modified by: earl
 * @Last Modified time: 2018-12-23 23:05:59
 * @Describe:  
 */

 const mongoose = require('mongoose')

 let personSchema = new mongoose.Schema({  // 新建字段
   name: String,
   age: Number
 })

module.exports =  mongoose.model('Person', personSchema) // 具备操作数据库的能力，是Schema和数据库的桥梁。第一个参数是表名